// Dynamic import() 按需引入
// 动态导入
const btn = document.querySelector('#btn')
oBtn.addEventListener('click', () => {
  import('./2-11').then((mod) => {
    console.log(mod)
    mod.default('static/a.json', (res) => {
      console.log(res)
    })
  })
})

// 例子 vue router
// 路由懒加载
const Foo = () => import('/Foo.vue')

const router = new vueRouter({
  routers: [{ path: 'foo', component: Foo }],
})
